﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="XmlDocNode.cs" company="xmldoc-reflector team">
//
// xmldoc-reflector, a library to access the XML code documentation of .NET assemblies
// Copyright (C) 2012 xmldoc-reflector team
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see http://www.gnu.org/licenses/. 
// </copyright>
// <author>
//   <name>Roland Reinl</name>
//   <mail>reinlroland@googlemail.com</mail>
// </author>
// <history>
//   <historyitem date="2012-10-27" change="Created file"/>
// </history>
// 
// --------------------------------------------------------------------------------------------------------------------
namespace XmlDocReflectorLib
{
  using System.Xml;

  /// <summary>
  /// Documentation node abstraction.
  /// </summary>
  public class XmlDocNode
  {
    /// <summary>
    /// The XML node containing the XML code documentation.
    /// </summary>
    private readonly XmlNode xmlNode;

    /// <summary>
    /// Initializes a new instance of the <see cref="XmlDocNode" /> class.
    /// </summary>
    /// <param name="documentationNode">The documentation node.</param>
    public XmlDocNode(XmlNode documentationNode)
    {
      this.xmlNode = documentationNode;
    }

    /// <summary>
    /// Gets the remarks.
    /// </summary>
    /// <value>
    /// The remarks.
    /// </value>
    public XmlNode Remarks
    {
      get
      {
        return this.xmlNode.SelectSingleNode("./remarks");
      }
    }

    /// <summary>
    /// Gets the summary.
    /// </summary>
    /// <value>
    /// The summary.
    /// </value>
    public XmlNode Summary
    {
      get
      {
        return this.xmlNode.SelectSingleNode("./summary");
      }
    }
  }
}
